package com.yiwenup.struct._04_heap;

import com.yiwenup.printer.BinaryTrees;

public class Main {
    public static void main(String[] args) {
//        test1();
        Integer[] data = {88, 44, 53, 41, 16, 6, 70, 18, 85, 98, 81, 23, 36, 43, 37};
        BinaryHeap<Integer> heap = new BinaryHeap<>(data);
        BinaryTrees.println(heap);
    }

    private static void test1() {
        BinaryHeap<Integer> binaryHeap = new BinaryHeap<>();
        binaryHeap.add(68);
        binaryHeap.add(72);
        binaryHeap.add(43);
        binaryHeap.add(50);
        binaryHeap.add(38);

        BinaryTrees.println(binaryHeap);
        binaryHeap.replace(23);
        BinaryTrees.println(binaryHeap);
    }
}
